﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

namespace MpSoft.Library.CommonLibrary
{
    public class LanguageInfo
    {
        public static string GetLanguage()
        {
            if (!string.IsNullOrEmpty(HttpContext.Current.Request.QueryString["Language"]))
                return HttpContext.Current.Request.QueryString["Language"].ToString();
            return "vi-VN";
        }
        public static string GetLanguage(string defaultValue)
        {
            string result = defaultValue;
            if (!string.IsNullOrEmpty(HttpContext.Current.Request.QueryString["Language"]))
            {
                defaultValue = HttpContext.Current.Request.QueryString["Language"].ToString();
                if (defaultValue.Equals("s"))
                    result = "vi-VN";
            }
            return result;
        }
    }
}
